var putong = '#888888';
var xiyou = '#97BD19';
var jingying = '#2FA905';
var wangzhe = '#05A9A0';
var shouling = '#A94F05';
var dihuang = '#2489DC';
var zhuzai = '#6B56E4';
var shishi = '#D029FD';
var chuanshuo = '#4D5CFF';
var banshen = '#F15353';
var zhenshen = '#FBA223';
var buxiu = '#000000';

var color = {};
color['putong'] = putong;
color['xiyou'] = xiyou;
color['jingying'] = jingying;
color['wangzhe'] = wangzhe;
color['shouling'] = shouling;
color['dihuang'] = dihuang;
color['zhuzai'] = zhuzai;
color['shishi'] = shishi;
color['chuanshuo'] = chuanshuo;
color['banshen'] = banshen;
color['zhenshen'] = zhenshen;
color['buxiu'] = buxiu;


function clone(obj) {
    var o, i, j, k;
    if (typeof (obj) != "object" || obj === null) return obj;
    if (obj instanceof (Array)) {
        o = [];
        i = 0; j = obj.length;
        for (; i < j; i++) {
            if (typeof (obj[i]) == "object" && obj[i] != null) {
                o[i] = arguments.callee(obj[i]);
            }
            else {
                o[i] = obj[i];
            }
        }
    }
    else {
        o = {};
        for (i in obj) {
            if (typeof (obj[i]) == "object" && obj[i] != null) {
                o[i] = arguments.callee(obj[i]);
            }
            else {
                o[i] = obj[i];
            }
        }
    }

    return o;
}

function isJson(obj) {
    var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length;
    return isjson;
}

function getJsonLength(jsonData) {

    var jsonLength = 0;

    for (var item in jsonData) {

        jsonLength++;

    }

    return jsonLength;

}